 <div >
   <form class="form-horizontal" role="form" name="myForm" novalidate ng-init="initQuery()">
     <div class="form-ctrl md-whiteframe-z1">
       <div class="form-search" style="height:270px;" ng-class="{true: 'shou'}[!shoumun.num]" ng-switch on="sendData.timeType">
         <div>
           <label style="width:70px">系统名称</label>
           <md-select ng-model="sendData.systemCode">
             <md-option ng-value="sysName.systemCode" ng-repeat="sysName in sysNames" ng-click="sysCascade(sysName.systemCode)">{{sysName.systemName}}</md-option>
           </md-select>
         </div>
         <div>
           <label style="width:70px">时间粒度</label>
           <md-select ng-model="sendData.timeType" placeholder="天">
             <md-option ng-value="timeType.timeTypeCode" ng-click="changeTime(timeType.timeTypeCode,sendData)"  ng-repeat="timeType in timeTypes">{{timeType.timeTypeName}}</md-option>
           </md-select>
         </div>
         <div  ng-switch-when="1">
           <md-input-container flex>
             <label >开始时间</label>
             <input type="date" ng-model="sendData.startTime"  time-validate="day"  end-time="sendData.endTime"  required name="startDate">
             <div ng-messages="myForm.startDate.$error">
               <div ng-message="date">请正确输入时间</div>
               <div ng-message="time-error">开始时间不应大于结束时间</div>
               <div ng-message="too-great">结束时间不应大于当前时间</div>
             </div>
           </md-input-container>
         </div>
         <div  ng-switch-when="1" >
           <md-input-container flex>
             <label >结束时间</label>
             <input type="date" ng-model="sendData.endTime"  time-validate="day" start-time="sendData.startTime" required name="endDate">
             <div ng-messages="myForm.endDate.$error">
               <div ng-message="date">请正确输入时间</div>
               <div ng-message="time-error">开始时间不应大于结束时间</div>
               <div ng-message="too-great">结束时间不应大于当前时间</div>
             </div>
           </md-input-container>
         </div>
         <div  ng-switch-when="0">
           <md-input-container flex>
             <label >开始时间</label>
             <input type="datetime-local" ng-model="sendData.startTime"  time-validate="hours" end-time="sendData.endTime"  required name="startDateTime">
             <div ng-messages="myForm.startDateTime.$error">
               <div ng-message="date">请正确输入时间</div>
               <div ng-message="time-error">开始时间不应大于结束时间</div>
               <div ng-message="too-great">结束时间不应大于当前时间</div>
             </div>
           </md-input-container>
         </div>
         <div  ng-switch-when="0" >
           <md-input-container flex>
             <label >结束时间</label>
             <input type="datetime-local" ng-model="sendData.endTime"  time-validate="hours" start-time="sendData.startTime" required name="endDateTime">
             <div ng-messages="myForm.endDateTime.$error">
               <div ng-message="date">请正确输入时间</div>
               <div ng-message="time-error">开始时间不应大于结束时间</div>
               <div ng-message="too-great">结束时间不应大于当前时间</div>
             </div>
           </md-input-container>
         </div>
         <div>
           <label style="width:70px">告警级别</label>
           <md-select ng-model="sendData.alarmLevel" >
             <md-select-label>
               {{sendData.alarmLevel ? _getNames(sendData.alarmLevel,'alarmLevelName',levels) : "全部"}}
             </md-select-label>
             <md-option ng-value="" ng-click="_checkAll(sendData,'alarmLevel')">全部</md-option>
             <md-option ng-value="level" ng-repeat="level in levels">{{level.alarmLevelName}}</md-option>
           </md-select>
         </div>
         <div>
           <label style="">状态</label>
           <md-select ng-model="sendData.alarmState">
             <md-select-label>
               {{sendData.alarmState ? _getNames(sendData.alarmState,'alarmStateName',states) : "全部"}}
             </md-select-label>
             <md-option ng-value="" ng-click="_checkAll(sendData,'alarmState')">全部</md-option>
             <md-option ng-value="state" ng-repeat="state in states">{{state.alarmStateName}}</md-option>
           </md-select>
         </div>

         <div>
           <md-input-container flex>
             <label>消息内容</label>
             <input ng-model="sendData.msg">
           </md-input-container>
         </div>
       </div> <i class="glyphicon glyphicon-chevron-up shrinkage" ng-click="shoumun.num=false"></i>
       <md-button ng-click="shoumun.num = !shoumun.num;search()" class="md-fab md-primary md-hue-1" aria-label="Profile"> <i class="glyphicon glyphicon-arrow-down" style="margin-top:28px;" ng-show="!shoumun.num"></i>
         <i class="glyphicon glyphicon-search" ng-show="shoumun.num"></i>
       </md-button>
     </div>
   </form>
   <div class="table-info">
     <div>
       <div class="menus" ng-show="flag === 'table' || flag === 'view'">
         <md-button aria-label="图表" ng-click="changeView()" class="md-raised ico-btn">
           <img src="images/charts.png"></md-button>

         <md-button aria-label="列表" ng-click="changeTable()" class="md-raised ico-btn">
           <img src="images/tables.png"></md-button>
       </div>
       <div ng-show="flag === 'tableDown'" >
         <md-button ng-click="back()" class="md-raised">返回</md-button>
       </div>
       <div ng-show="flag === 'view'" id="doc" style="height:500px;"></div>
       <div class="table-detail" ng-show="flag === 'table'">
         <div class="t_r" >
           <table class="table table-bordered">
             <caption style="text-align:center;font-size:large;font-weight:bold;color:black">{{tableTitle}}
             </caption>
             <thead>
               <tr>
                 <th width="5%">序号</th>
                 <th>系统名称</th>
                 <th>告警级别</th>
                 <th>告警状态</th>
                 <th>应用告警数</th>
                 <th width="15%">时间</th>
               </tr>
             </thead>
             <tbody>
               <tr ng-repeat="item in items.lineData" ng-click="tableDown(item)">
                 <td>{{$index+1}}</td>
                 <td>{{item.systemName}}</td>
                 <td>{{item.alarmLevelName}}</td>
                 <td>{{item.alarmStateName}}</td>
                 <td>{{item.alarmNum}}</td>
                 <td>{{item.time}}</td>
               </tr>
             </tbody>
           </table>
           <ds-page
              total-count="items.totalCount"
              page-size="send.page.pageSize"
              page-itmes="pageItmes"
              param="send"
              current-page="send.page.currentPage"
              go-page="changeTable(send)"
              page-size-change="pageSizeChange(send.page.pageSize)"
              show-max-page="5"
              first-text="<<"
              last-text=">
             >"
              previous-text="
             <"
              next-text=">
               "
              >
             </ds-page>
           </div>
         </div>
      <div class="table-detail" ng-show="flag === 'tableDown'">
           <div class="t_r" >
             <table  class="table table-bordered">
               <caption style="text-align:center;font-size:large;font-weight:bold;color:black">{{titleDetTable}}
             </caption>
               <thead>
                 <tr>
                   <th>序号</th>
                   <th>系统名称</th>
                   <!--<th>IP映射名</th>-->
                   <th>告警级别</th>
                   <th>告警内容</th>
                   <th>告警状态</th>
                   <!-- <th>消息内容</th> -->
                 </tr>
               </thead>
               <tbody>
                 <tr ng-repeat="det in downItmes.flag">
                   <td>{{$index+1}}</td>
                   <td>{{det.systemName}}</td>
                   <!--<td>{{det.ipName}}</td>-->
                   <td>{{det.alarmLevelName}}</td>
                   <td title="{{det.contents}}" ng-if="det.contents.length>=10">{{det.contents.substring(0,10)}}....</td>
                   <td title="{{det.contents}}" ng-if="det.contents.length<=10">{{det.contents}}</td>
                   <td>{{det.alarmStateName}}</td>
                   <!-- <td>{{det.msg}}</td> -->
                 </tr>
               </tbody>
             </table>
           </div>
           <ds-page
              total-count="totalCount"
              page-size="sendDet.page.pageSize"
              page-itmes="pageItmes"
              param="sendDet"
              current-page="sendDet.page.currentPage"
              go-page="tableDown(sendDet)"
              show-max-page="5"
              first-text="<<"
              last-text=">
             >"
              previous-text="
             <"
              next-text=">
               "
              >
             </ds-page>
           </div>
        </div>
       </div>
     </div>
     <core-loading ng-show="core.loading"></core-loading>